package com.audaque.springboot.foshanupload.web.openfeigndemo.feign.api;

import com.audaque.springboot.foshanupload.authcore.anno.NeedLoginAnno;
import com.audaque.springboot.foshanupload.authcore.model.currentUser.TransmittableThreadLocalCurrentUser;
import com.audaque.springboot.foshanupload.openfeign.interceptor.FeignRequestInterceptor;
import com.audaque.springboot.foshanupload.web.openfeigndemo.feign.api.fallback.FeignFallback;
import com.audaque.springboot.foshanupload.web.openfeigndemo.service.FeignService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;


@FeignClient(
        //value，name二选一
        //name：服务名称 （注：若使用注册中心，此处应该写生产者服务名称）
        name = "logindemo-local-feign",
        //url：生产者的url地址
        url = "http://localhost:8581/logindemo",
        configuration = FeignRequestInterceptor.class
)
public interface LogindemoFeign  {

    @NeedLoginAnno
    @GetMapping("/getCurrentUser")
    public TransmittableThreadLocalCurrentUser getCurrentUser() ;
}